<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<link rel="stylesheet"
			href="${pageContext.request.contextPath}/css/base.css" />
		<link rel="stylesheet"
			href="${pageContext.request.contextPath}/css/info-reg.css" />
		<title>论坛版块信息填写</title>
		<script type="text/javascript"
			src="${pageContext.request.contextPath }/js/jquery.js"></script>
		<script type="text/javascript">
	showRemind('input[type=text], textarea', 'placeholder');

	function checkData() {
		if ($("#secName_id").val() != null && $("#secName_id").val()!="") {
			var div_1 = document.getElementById("div_1");
			div_1.style.display = 'none';
		}else{
			 div_1 = document.getElementById("div_1");
			div_1.style.display = 'block';
			
		}
		if ($("#masterId_id").val()!= null && $("#masterId_id").val()!="") {
			var div_2 = document.getElementById("div_2");
			div_2.style.display = 'none';
		}else{
		var div_2 = document.getElementById("div_2");
			div_2.style.display = 'block';
		}
		if ($("#secStatement_id").val()!= null && $("#secStatement_id").val()!="") {
			var div_3 = document.getElementById("div_3");
			div_3.style.display = 'none';
		}else{
			var div_3 = document.getElementById("div_3");
			div_3.style.display = 'block';
		}
		
		
		
	}
	function check(){
	
	    if($("#secName_id").val()!=""&&$("#masterId_id").val()!=""&&
	    $("#secStatement_id").val()!=""
	    ){
	   
	    var btnsave=document.getElementById("btnsave_id");
	   $("#btnsave_id").attr("disabled",false);
	    }else{
	      $("#btnsave_id").attr("disabled",true);
	    }
	}
</script>
<style type="text/css">
td {
	font-size: 15px;
}
 lable{
 color: yellow;
 }
body {
	background-image:
		url(${pageContext.request.contextPath}/images/forum2.jpg);
}
</style>
	</head>

	<body>
	
		<div class="title">
			<h2>
				论坛版块信息登记
			</h2>
		</div>
		<div class="main" align="center">

			<form action="${pageContext.request.contextPath}/ForumManager.action?method=saveSection" method="post" >
				<table align="center" cellpadding="0" cellspacing="0" border="0"
					width="80%">
					<tr>
						<td colspan="2">
							<h2 style="font-size: 15px;">
								请编辑以下论坛版块信息
							</h2>
						</td>
					</tr>
				
					<tr class="short-input ue-clear">
						<td>
							<br>
							版块名称：
						</td>
						<td>
							<br>
							<input type="text" name="secName" id="secName_id" onblur="checkData();"/>
						</td>
						<td>
							<div id="div_1" style="color: red;display: block;">
								请输入正确的版块名称!
							</div>

						</td>
					</tr>
					<tr class="short-input ue-clear">
						<td>
							<br>
							版块版主：
						</td>
						<td>
							<br />
							<input type="text" name="masterId" id="masterId_id" 
							value="${login_User.userId }" style="background-color: #e8c597;" readonly="readonly"/>

						</td>
						<td><br/>
							<div id="div_2" style="color: green;">
								版块版主为当前登录用户Id!不可编辑
							</div>
						</td>
					</tr>
					
					<tr class="long-input ue-clear">
						<td>
							<br />
							版块说明：
						</td>
						<td>
							<br />
							<textarea rows="3" cols="15" name="secStatement" id="secStatement_id" onblur="checkData();"
							onmouseout="check();"></textarea>
						</td>
						<td>
							<div id="div_3" style="color: red;">
								请编辑版块说明!
							</div>
						</td>
					</tr>
					<tr class="short-input ue-clear">
						<td>
							<br>
							版块点击数：
						</td>
						<td>
							<br>
							<input type="text" name="secClickcount" id="secClickcount_id" value="0" style="background-color: #e8c597;"/>
						</td>
						<td><br/><lable>不可编辑</lable></td>
					</tr>
					<tr class="short-input ue-clear">
						<td>
							<br>
							版块主贴数：
						</td>
						<td>
							<br>
							<input type="text" name="secTopiccount" id="secTopiccount_id"  value="0" style="background-color: #e8c597;"/>
						</td>
						<td><br/><lable>不可编辑</lable></td>
					</tr>
					<tr class="long-input ue-clear">
						<td align="left">
							<br />
							<input type="submit"
								style="background-color: green; width: 100px;" value="确定"
								disabled id="btnsave_id"/>
						</td>
						<td align="right">
							<br />
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

							<input type="reset"
								style="background-color: white; width: 100px;" value="清空内容" />
						</td>
					</tr>
				</table>
			</form>
		</div>

		</div>
	</body>
</html>
